.customer-service {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: var(--bg-color);
  overflow: hidden;
}

.customer-service .chat-container {
  flex: 1;
  display: flex;
  max-width: 1800px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  gap: 1.5rem;
  height: 100%;
  overflow: hidden;
}

.customer-service .sidebar {
  width: 300px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.customer-service .sidebar .history-header {
  flex-shrink: 0;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.customer-service .sidebar .history-header h2 {
  font-size: 1.25rem;
}

.customer-service .sidebar .history-header .new-chat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: #333;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.customer-service .sidebar .history-header .new-chat:hover {
  background: #000;
}

.customer-service .sidebar .history-header .new-chat .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.customer-service .sidebar .history-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem 1rem;
}

.customer-service .sidebar .history-list .history-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.customer-service .sidebar .history-list .history-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.customer-service .sidebar .history-list .history-item.active {
  background: rgba(0, 0, 0, 0.1);
}

.customer-service .sidebar .history-list .history-item .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.customer-service .sidebar .history-list .history-item .title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-service .chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.customer-service .chat-main .service-header {
  flex-shrink: 0;
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.98);
}

.customer-service .chat-main .service-header .service-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.customer-service .chat-main .service-header .service-info .avatar {
  width: 48px;
  height: 48px;
  color: #333;
  padding: 6px;
  background: #f0f0f0;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.customer-service .chat-main .service-header .service-info .avatar:hover {
  background: #e0e0e0;
  transform: scale(1.05);
}

.customer-service .chat-main .service-header .service-info .info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.customer-service .chat-main .service-header .service-info .info p {
  font-size: 0.875rem;
  color: #666;
}

.customer-service .chat-main .messages {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.customer-service .chat-main .messages .chart-container {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 0.5rem;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  height: 300px;
}

.customer-service .chat-main .input-area {
  flex-shrink: 0;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.customer-service .chat-main .input-area textarea {
  flex: 1;
  resize: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  color: inherit;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  max-height: 150px;
}

.customer-service .chat-main .input-area textarea:focus {
  outline: none;
  border-color: #333;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.customer-service .chat-main .input-area .send-button {
  background: #333;
  color: white;
  border: none;
  border-radius: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
}

.customer-service .chat-main .input-area .send-button:hover:not(:disabled) {
  background: #000;
}

.customer-service .chat-main .input-area .send-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.customer-service .chat-main .input-area .send-button .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.customer-service .booking-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.customer-service .booking-modal .modal-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.customer-service .booking-modal .modal-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

.customer-service .booking-modal .modal-content .booking-info {
  margin: 1.5rem 0;
  text-align: left;
  line-height: 1.6;
  color: #666;
}

.customer-service .booking-modal .modal-content button {
  padding: 0.75rem 2rem;
  background: #333;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.customer-service .booking-modal .modal-content button:hover {
  background: #000;
}

.dark .customer-service .sidebar {
  background: rgba(40, 40, 40, 0.95);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.dark .customer-service .chat-main {
  background: rgba(40, 40, 40, 0.95);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.dark .customer-service .chat-main .service-header {
  background: rgba(30, 30, 30, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dark .customer-service .chat-main .service-header .service-info .avatar {
  color: #fff;
  background: #444;
}

.dark .customer-service .chat-main .service-header .service-info .avatar:hover {
  background: #555;
}

.dark .customer-service .chat-main .service-header .service-info .info p {
  color: #999;
}

.dark .customer-service .chat-main .messages .chart-container {
  background: rgba(30, 30, 30, 0.98);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dark .customer-service .chat-main .input-area {
  background: rgba(30, 30, 30, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.dark .customer-service .chat-main .input-area textarea {
  background: rgba(50, 50, 50, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.dark .customer-service .chat-main .input-area textarea:focus {
  border-color: #666;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.dark .customer-service .booking-modal .modal-content {
  background: #333;
}

.dark .customer-service .booking-modal .modal-content h3 {
  color: #fff;
}

.dark .customer-service .booking-modal .modal-content .booking-info {
  color: #ccc;
}

.dark .customer-service .booking-modal .modal-content button {
  background: #666;
}

.dark .customer-service .booking-modal .modal-content button:hover {
  background: #888;
}

@media (max-width: 768px) {
  .customer-service .chat-container {
    padding: 0;
  }

  .customer-service .sidebar {
    display: none;
  }

  .customer-service .chat-main {
    border-radius: 0;
  }
}